import type { model_meta } from '@/types/global'
import {
  e_code_ctrl_method,
  e_direction,
  e_material_storage_status,
  e_material_type,
  e_optimize,
  e_stock_order_type,
  e_coil_stock_status,
  e_store_lv,
  e_store_state,
  e_store_tag,
  e_store_type,
  e_unit_type,
  e_volumn_type,
  e_stock_order_status,
  e_qc_status,
  e_code_stage,
  e_move_status,
  e_require_order_type,
  e_require_order_status,
  e_call_status,
  e_pick_status
} from '@/types/enum.js'

export const cut_demand_define: model_meta[] = [
  { code: 'mocode', name: '生产单号', description: '', width: 100 },
  { code: 'billcode', name: '需求单号', description: '', width: 100 },
  { code: 'partcode', name: '部件号', description: '', width: 80 },
  { code: 'partname', name: '部件名', description: '', width: 80 },
  { code: 'qty', name: '需求数量', description: '', width: 80 },
  { code: 'material_type', name: '用料类型', width: 100, options_enum: e_material_type },
  { code: 'unit', name: '单位', width: 70, options_enum: e_unit_type },
  {
    code: 'cut_solution',
    name: '开料方案',
    width: 180,
    ref_args: { codeField: 'cut_code', textField: 'cut_name', jsonPath: 'cutsolution' }
  },
  { code: 'require_date', name: '需求日期', description: '', width: 100 },
  { code: 'plandept', name: '计划部门', description: '', width: 100 },
  { code: 'planer', name: '计划员', description: '', width: 80 },
  { code: 'doc_date', name: '计划日期', description: '', width: 100 },
  { code: 'height', name: '厚度', description: '', width: 80 },
  {
    code: 'metal',
    name: '材质',
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'metal' }
  },
  { code: 'optimize', name: '算料优化', width: 100, options_enum: e_optimize }
]

export const cut_solution_define: model_meta[] = [
  { code: 'cut_code', name: '方案代号', description: '', width: 100 },
  { code: 'cut_name', name: '方案名称', description: '', width: 200 },
  { code: 'output', name: '产出数', description: '', width: 100 },
  { code: 'length', name: '长', description: '', width: 100 },
  { code: 'width', name: '宽', description: '', width: 100 },
  { code: 'even_offset', name: '偶行缩进', description: '', width: 100 },
  { code: 'h_offset', name: '横向位移', description: '', width: 100 },
  { code: 'v_offset', name: '竖向位移', description: '', width: 100 }
]

export const metail_list_define: model_meta[] = [
  { code: 'code', name: '材质代号', description: '', width: 100 },
  { code: 'name', name: '材质名称', description: '', width: 150 },
  { code: 'unit', name: '单位', options_enum: e_unit_type, description: '', width: 100 },
  { code: 'description', name: '描述', description: '', width: 200 },
  { code: 'density', name: '密度(kg/m3)', description: '', width: 130 }
]
export const coil_define: model_meta[] = [
  { code: 'material', name: '材料', description: '', width: 100 },
  { code: 'stock_in_date', name: '入库日期', description: '', width: 100 },
  { code: 'stock_in_bill', name: '入库单号', description: '', width: 100 },
  {
    code: 'metal',
    name: '材质',
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'metal' }
  },
  { code: 'orig_length', name: '原始长', description: '', width: 100 },
  { code: 'orig_weight', name: '原始重', description: '', width: 100 },
  { code: 'width', name: '宽度', description: '', width: 100 },
  { code: 'height', name: '厚度', description: '', width: 100 },
  { code: 'length', name: '长度', description: '', width: 100 },
  { code: 'barcode', name: '条码号', description: '', width: 130 },
  { code: 'location', name: '位置', description: '', width: 100 },
  { code: 'weight_unit', name: '重量单位', description: '', options_enum: e_unit_type, width: 100 },
  { code: 'length_unit', name: '长度单位', description: '', options_enum: e_unit_type, width: 100 },
  {
    code: 'stock_status',
    name: '状态',
    description: '',
    options_enum: e_coil_stock_status,
    width: 100
  }
]

export const cut_demand_sum_define: model_meta[] = [
  { code: 'billcode', name: '单号', description: '', width: 120 },
  { code: 'plandept', name: '计划部门', description: '', width: 100 },
  { code: 'doc_date', name: '单据日期', description: '', width: 100 },
  { code: 'planer', name: '计划人', description: '', width: 80 },
  { code: 'doc_date', name: '单据日期', description: '', width: 100 },
  { code: 'plan_date', name: '计划日期', description: '', width: 100 },
  { code: 'mo_count', name: '总订单数', description: '', width: 80 },
  { code: 'all_demand', name: '需求单数', description: '', width: 80 },
  { code: 'material_type', name: '用料类型', width: 100, options_enum: e_material_type },
  { code: 'height', name: '厚度', description: '', width: 80 },
  {
    code: 'metal',
    name: '材质',
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'metal' }
  },
  { code: 'total_pattern', name: '总排版数', description: '', width: 80 },
  { code: 'total_parts', name: '总产出', description: '', width: 80 },
  { code: 'computed', name: '已计算', description: '', width: 80 }
]

const _cut_demand_detail_define: model_meta[] = JSON.parse(JSON.stringify(cut_demand_define))
_cut_demand_detail_define.push({ code: 'unit_output', name: '单位排版产出', width: 120 })
_cut_demand_detail_define.push({ code: 'all_pattern', name: '总排版数', width: 80 })
_cut_demand_detail_define.push({ code: 'cut_length', name: '版长', width: 80 })
_cut_demand_detail_define.push({ code: 'cut_width', name: '版宽', width: 80 })
_cut_demand_detail_define.push({ code: 'even_offset', name: '偶行缩进', width: 80 })
_cut_demand_detail_define.push({ code: 'h_offset', name: '横向偏移', width: 80 })
_cut_demand_detail_define.push({ code: 'h_offset', name: '竖向偏移', width: 80 })
export const cut_demand_detail_define = _cut_demand_detail_define

export const cut_process_define: model_meta[] = [
  { code: 'groupcode', name: '批次号', description: '', width: 100 },
  { code: 'coil_width', name: '选材宽', description: '', width: 80 },
  { code: 'part_code', name: '部件编号', description: '', width: 80 },
  { code: 'part_name', name: '部件名称', description: '', width: 100 },
  { code: 'cut_pattern', name: '需开版数', description: '', width: 80 },
  { code: 'part_each_pattern', name: '每版产出', description: '', width: 80 },
  { code: 'part_qty', name: '部件数', description: '', width: 80 },

  { code: 'cut_length', name: '版长', description: '', width: 80 },
  { code: 'cut_width', name: '版宽', description: '', width: 80 },
  { code: 'direction', name: '方向', description: '', width: 60, options_enum: e_direction },
  { code: 'cuts_each_row', name: '开料列', description: '', width: 80 },
  { code: 'cut_rows', name: '开料行', description: '', width: 80 },
  { code: 'row_remainder', name: '行余料', description: '', width: 80 },
  { code: 'all_remainder', name: '余料', description: '', width: 80 },
  { code: 'coil_length', name: '用料(mm)', description: '', width: 100 },
  {
    code: 'cut_solution',
    name: '开料方案',
    width: 160,
    ref_args: { codeField: 'cut_code', textField: 'cut_name', jsonPath: 'cutsolution' }
  },
  { code: 'demandcode', name: '需求号', description: '', width: 120 },
  { code: 'mocode', name: '生产单', description: '', width: 120 },
  { code: 'over_output', name: '超额产出', description: '', width: 80 },
  { code: 'over_output_area', name: '超产面积', description: '', width: 100 }
]

export const cut_propose_define: model_meta[] = [
  { code: 'propose_code', name: '运算号', description: '', width: 120 },
  { code: 'width', name: '选材宽', description: '', width: 80 },
  { code: 'groupcode', name: '批次单号', description: '', width: 120 },
  {
    code: 'metal',
    name: '材质',
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'metal' }
  },
  { code: 'total_remainder', name: '总余料(m2)', description: '', width: 100 },
  { code: 'total_coil_length', name: '总卷长(m)', description: '', width: 100 },
  { code: 'total_area', name: '总面积(m2)', description: '', width: 100 },
  { code: 'effective_area', name: '有效面积(m2)', description: '', width: 120 },
  { code: 'usage', name: '利用率', description: '', width: 100 },
  { code: 'match_coils_count', name: '候选卷数', description: '', width: 100 },
  { code: 'use_coil', name: '选材', description: '', width: 130 },
  { code: 'total_over_output_area', name: '超产面积', description: '', width: 130 }
]
export const bd_section_define: model_meta[] = [
  { code: 'code', name: '代号' },
  { code: 'name', name: '名称' },
  { code: 'area', name: '截面面积' },
  { code: 'area_unit', name: '面积单位', options_enum: e_unit_type }
]
export const pd_stick_define: model_meta[] = [
  { code: 'material', name: '物料' },
  { code: 'stock_in_date', name: '最后入库日' },
  { code: 'stock_in_bill', name: '最后入库单' },
  {
    code: 'metal',
    name: '材质',
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'metal' }
  },
  {
    code: 'section',
    name: '截面',
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'section' }
  },
  { code: 'length', name: '长度' },
  { code: 'barcode', name: '条码号' },
  { code: 'location', name: '位置' },
  { code: 'weight_unit', name: '重量单位', options_enum: e_unit_type },
  { code: 'length_unit', name: '长度单位', options_enum: e_unit_type },
  { code: 'stock_unit', name: '计数单位', options_enum: e_unit_type },
  { code: 'stock_status', name: '库存状态', options_enum: e_coil_stock_status },
  { code: 'qty', name: '库存数量' },
  { code: 'is_remainder', name: '是否余料' }
]

export const divide_demand_define: model_meta[] = [
  { code: 'billcode', name: '需求单号' },
  { code: 'partcode', name: '部件编号' },
  { code: 'partname', name: '部件名称' },
  { code: 'length', name: '裁切长度' },
  { code: 'qty', name: '需求数', width: 80 },
  { code: 'material_type', name: '需求类型', options_enum: e_material_type },
  { code: 'unit', name: '单位', options_enum: e_unit_type },
  { code: 'require_date', name: '需求日期' },
  { code: 'plandept', name: '计划部门' },
  { code: 'planer', name: '计划人' },
  { code: 'doc_date', name: '单据日期' },
  { code: 'mocode', name: '订单号', width: 130 },
  {
    code: 'metal',
    name: '材质',
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'metal' }
  },
  {
    code: 'section',
    name: '截面',
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'section' }
  },
  { code: 'optimize', name: '算料方式', options_enum: e_optimize }
]

export const divide_demand_sum_define: model_meta[] = [
  { code: 'billcode', name: '批次号', width: 150 },
  { code: 'plandept', name: '计划部门' },
  { code: 'planer', name: '计划人', width: 80 },
  { code: 'doc_date', name: '单据日期' },
  { code: 'plan_date', name: '计划日期' },
  { code: 'mo_count', name: '总订单数' },
  { code: 'material_type', name: '用料类型', options_enum: e_material_type },
  {
    code: 'metal',
    name: '材质',
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'metal' }
  },
  { code: 'total_parts', name: '总部件数' },
  { code: 'unit', name: '单位', options_enum: e_unit_type },
  { code: 'all_length', name: '总长' },
  {
    code: 'section',
    name: '截面',
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'section' }
  }
]

export const stick_propose_group_define: model_meta[] = [
  { code: 'groupcode', name: '批次号', width: 150 },
  {
    code: 'metal',
    name: '材质',
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'metal' }
  },
  {
    code: 'section',
    name: '截面',
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'section' }
  },
  { code: 'all_stick_length', name: '投料总长' },
  { code: 'all_remainder_length', name: '余料总长' },
  { code: 'lengths', name: '投料规格' },
  { code: 'usage', name: '利用率' }
]

export const stick_part_define: model_meta[] = [
  { code: 'demandcode', name: '需求号', width: 150 },
  { code: 'part_code', name: '部件号' },
  { code: 'part_name', name: '部件名', width: 130 },
  { code: 'demand_qty', name: '需求数' },
  { code: 'mocode', name: '订单号', width: 120 },
  { code: 'length', name: '长度', width: 120 }
]

export const stick_propose_detail_define: model_meta[] = [
  { code: 'id', name: '业务号', width: 150 },
  { code: 'stick_length', name: '长棍长' },
  { code: 'stick_qty', name: '所需长棍' },
  { code: 'unit_output', name: '单棒产出' },
  { code: 'all_output', name: '总产出' },
  { code: 'unit_remainder', name: '单棒余料' },
  { code: 'last_remainder', name: '尾棒余料' },
  { code: 'all_remainder', name: '总余料' },
  { code: 'use_remainder_id', name: '棒料来源', width: 130 },
  { code: 'src_divide', name: '产出自', width: 150 }
]

export const t_remainder_stick_define: model_meta[] = [
  { code: 'id', name: '运算ID', width: 150 },
  { code: 'from_propose_detail', name: '业务号', width: 150 },
  { code: 'from', name: '产出过程', width: 150 },
  { code: 'qty', name: '余料数' },
  { code: 'length', name: '余料长' },
  { code: 're_input', name: '重新投入' },
  { code: 'balance', name: '结余' }
]

export const coils_cut_order_define: model_meta[] = [
  { code: 'billcode', name: '订单编号', width: 150 },
  { code: 'billdate', name: '订单日期', width: 120 },
  { code: 'height', name: '厚度', width: 80 },
  { code: 'use_width', name: '卷宽', width: 150 },
  { code: 'closed', name: '关闭', width: 150 },
  { code: 'total_weight', name: '总重量', width: 100 },
  { code: 'weight_unit', name: '重量单位', width: 100 },
  {
    code: 'metal',
    name: '材质',
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'metal' }
  },
  {
    code: 'use_coil',
    name: '卷号',
    width: 130,
    ref_args: { codeField: 'barcode', textField: 'barcode', jsonPath: 'coils' }
  },
  { code: 'material', name: '材料编号' },
  { code: 'total_coil_length', name: '开料总长' },
  { code: 'total_part', name: '需求数' },
  { code: 'total_over_output', name: '超产数' }
]

export const coils_cut_order_detail_define: model_meta[] = [
  { code: 'part_code', name: '部件代号', width: 110 },
  { code: 'part_name', name: '部件名称', width: 120 },
  { code: 'use_length', name: '用量（长）', width: 100 },
  { code: 'cut_length', name: '开料长', width: 100 },
  { code: 'cut_width', name: '开料宽' },
  { code: 'all_output', name: '总产出' },
  { code: 'demand_output', name: '需求' },
  { code: 'over_output', name: '超产' },
  {
    code: 'cut_solution',
    name: '开料方案',
    width: 150,
    ref_args: { codeField: 'cut_code', textField: 'cut_name', jsonPath: 'cutsolution' }
  },
  { code: 'direction', name: '排班方向', options_enum: e_direction },
  { code: 'mocode', name: '生产单号', width: 120 },
  { code: 'demandcode', name: '需求单号', width: 120 },
  { code: 'cut_pattern', name: '每版产出' },
  { code: 'rows', name: '共开版行' },
  { code: 'cuts_each_row', name: '每行开版' }
]

export const board_define: model_meta[] = [
  { code: 'material', name: '料号', width: 110 },
  { code: 'stock_in_bill', name: '入库编号', width: 110 },
  { code: 'stock_in_date', name: '入库日期', width: 110 },
  {
    code: 'metal',
    name: '材质',
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'metal' }
  },
  { code: 'height', name: '厚度' },
  { code: 'length', name: '长' },
  { code: 'width', name: '宽' },
  { code: 'barcode', name: '条码', width: 120 },
  { code: 'location', name: '位置', width: 120 },
  { code: 'weight_unit', name: '重量单位' },
  { code: 'stock_unit', name: '计量单位' },
  { code: 'stock_status', name: '状态', options_enum: e_coil_stock_status },
  { code: 'qty', name: '存量' }
]
export const material_define: model_meta[] = [
  { code: 'code', name: '代号', width: 110 },
  { code: 'name', name: '名称', width: 110 },
  { code: 'spec', name: '规格', width: 110 },
  { code: 'unit', name: '单位', options_enum: e_unit_type },
  { code: 'pu_code_stage', name: '采购贴码', options_enum: e_code_stage },
  { code: 'oe_code_stage', name: '委外贴码', options_enum: e_code_stage },
  { code: 'to_code_stage', name: '调拨贴码', options_enum: e_code_stage },
  { code: 're_code_stage', name: '退货贴码', options_enum: e_code_stage },
  { code: 'l', name: '长', width: 80 },
  { code: 'w', name: '宽', width: 80 },
  { code: 'h', name: '高', width: 80 },
  { code: 'storage_org', name: '库存组织', width: 110 },
  { code: 'store_type', name: '存储类型', options_enum: e_store_type },
  { code: 'store_tag', name: '存储标识', options_enum: e_store_tag }
]
export const material_storage_policy_define: model_meta[] = [
  { code: 'id', name: '标识', width: 110 },
  { code: 'version', name: '版本', width: 110 },
  { code: 'ctrl_method', name: '管理模式', width: 110, options_enum: e_code_ctrl_method },
  { code: 'default', name: '默认版本', width: 100 },
  { code: 'unit_qty', name: '单位数量', width: 100 }
]
export const location_define: model_meta[] = [
  { code: 'code', name: '代号', width: 130 },
  { code: 'barcode', name: '条码号', width: 120 },
  { code: 'volumn', name: '库容', options_enum: e_volumn_type },
  { code: 'store_lv', name: '级别', options_enum: e_store_lv },
  { code: 'store_type', name: '存储类型', options_enum: e_store_type, mult: true },
  { code: 'store_state', name: '存储状态', options_enum: e_store_state },
  { code: 'store_tags', name: '存储标识', options_enum: e_store_tag, mult: true },
  { code: 'block_in', name: '禁入' },
  { code: 'block_out', name: '禁出' },
  { code: 'zone', name: '区域' },
  { code: 'keeper', name: '库管人' },
  { code: 'last_tally', name: '库管人' },
  { code: 'next_tally', name: '下次盘点' },
  { code: 'tally_interval', name: '盘点间隔' },
  { code: 'total_volumn', name: '库容' },
  { code: 'use_volumn', name: '已使用' }
]

export const qrcode_define: model_meta[] = [
  {
    code: 'material',
    name: '物料',
    width: 130,
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'material' }
  },
  { code: 'qrcode', width: 130, name: '条码' },
  { code: 'qty', name: '数量', width: 80 },
  { code: 'version', name: '版本', width: 80 },
  { code: 'batchcode', width: 130, name: '批次' },
  { code: 'status', name: '状态', options_enum: e_material_storage_status },
  {
    code: 'location',
    name: '库位',
    width: 130,
    ref_args: { codeField: 'barcode', textField: 'code', jsonPath: 'location' }
  },
  { code: 'ctrl_method', name: '管理模式', options_enum: e_code_ctrl_method },
  { code: 'last_stock_in', name: '最后入库' },
  { code: 'last_stock_out', name: '最后出库' },
  { code: 'arrive_bill', width: 130, name: '到货单' },
  { code: 'reserv_qty', name: '预留数' },
  { code: 'l', name: '长', width: 80 },
  { code: 'w', name: '宽', width: 80 },
  { code: 'h', name: '高', width: 80 },
  { code: 'reserv_by', name: '预留', width: 80 },
  { code: 'print_count', name: '打印次数', width: 80 }
]
export const pd_location_storage_define: model_meta[] = [
  {
    code: 'material',
    name: '物料',
    width: 130,
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'material' }
  },
  { code: 'qty', name: '数量' },
  {
    code: 'location',
    name: '库位',
    width: 130,
    ref_args: { codeField: 'barcode', textField: 'code', jsonPath: 'location' }
  }
]
export const stock_order_define: model_meta[] = [
  { code: 'billtype', name: '入库类型', options_enum: e_stock_order_type },
  {
    code: 'material',
    name: '物料',
    width: 130,
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'material' }
  },
  { code: 'status', name: '状态', options_enum: e_stock_order_status },
  { code: 'order_qty', name: '订单数量' },
  { code: 'unit', name: '单位', options_enum: e_unit_type },
  { code: 'staff', name: '跟单' },
  { code: 'supplier', name: '发货方' },
  { code: 'billcode', name: '单号' },
  { code: 'billdate', name: '单据日期' },
  { code: 'plan_arrive_date', name: '计划到货' },
  { code: 'arrived_qty', name: '收货数量' },
  { code: 'reserved_qty', name: '预留数量', width: 100 }
]

export const arrive_bill_define: model_meta[] = [
  { code: 'billtype', name: '入库类型', options_enum: e_stock_order_type },
  {
    code: 'material',
    name: '物料',
    width: 130,
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'material' }
  },
  { code: 'status', name: '状态', options_enum: e_qc_status, width: 85 },
  { code: 'arrive_qty', name: '到货数量', width: 85 },
  { code: 'qualified', name: '合格数量', width: 85 },
  { code: 'unqualified', name: '不合格数量', width: 100 },
  { code: 'special_qty', name: '特采数量', width: 85 },
  { code: 'stockin_qty', name: '入库数量', width: 85 },
  { code: 'return_qty', name: '退货数量', width: 85 },
  { code: 'reserved_qty', name: '预留数量', width: 85 },
  { code: 'unit', name: '单位', options_enum: e_unit_type },
  { code: 'staff', name: '跟单' },
  { code: 'supplier', name: '发货方' },
  { code: 'billcode', width: 125, name: '单号' },
  { code: 'billdate', name: '单据日期' },
  { code: 'code_qty', name: '建码数量' },
  {
    code: 'storage_policy',
    name: '管控政策',
    text_field: 'id'
  }
]
export const move_bill_detail_define: model_meta[] = [
  { code: 'arrive_bill', name: '单据', width: 130, ref_args: { codeField: 'billcode', textField: 'billcode', jsonPath: 'arrive' } },
  { code: 'qrcode', name: '物码', width: 130, ref_args: { codeField: 'qrcode', textField: 'qrcode', jsonPath: 'qrcode' } },
  { code: 'material', name: '料号', width: 130, ref_args: { codeField: 'code', textField: 'name', jsonPath: 'material' } }
]
export const move_bill_define: model_meta[] = [
  { code: 'billcode', name: '单号', width: 130 },
  { code: 'docdate', name: '日期' },
  { code: 'status', name: '状态', options_enum: e_move_status },
  { code: 'staff', name: '工人' },
  { code: 'finish_date', name: '完工日期' },
  {
    code: 'location',
    name: '库位',
    width: 130,
    ref_args: { codeField: 'barcode', textField: 'code', jsonPath: 'location' }
  }
]
export const require_order_define: model_meta[] = [
  { code: 'billcode', name: '单号', width: 130 },
  { code: 'billdate', name: '单号', width: 100 },
  { code: 'order_bill', name: '对应订单', width: 100 },
  { code: 'billtype', name: '发料类型', options_enum: e_require_order_type },
  { code: 'plan_demand_date', name: '计划发料日', width: 100 },
  { code: 'status', name: '发料状态', width: 100, options_enum: e_require_order_status },
  {
    code: 'material',
    name: '物料',
    width: 130,
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'material' }
  },
  { code: 'dept', name: '需求部门', width: 100 },
  { code: 'staff', name: '业务员', width: 100 },
  { code: 'unit', name: '单位', width: 100 },
  { code: 'order_qty', name: '订单数量', width: 100 },
  { code: 'called_qty', name: '叫料数量', width: 100 },
  { code: 'locked_qty', name: '锁定数量', width: 100 },
  { code: 'reserved_qty', name: '预留数量', width: 100 },
  { code: 'stockout_qty', name: '已发数量', width: 100 }
]

export const t_reserv_candidates_define: model_meta[] = [
  { code: 'billcode', name: '单号', width: 130 },
  { code: 'materialcode', name: '物料编号' },
  { code: 'type', name: '类型', width: 85 },
  { code: 'supplyqty', name: '供应数', width: 85 },
  { code: 'reserved', name: '已预留数', width: 85 },
  { code: 'myreserved', name: '本单预留', width: 85 },
  { code: 'reservable', name: '可预留数', width: 85 }
]

export const mtl_call_define: model_meta[] = [
  { code: 'srcbill', name: '来源', width: 130 },
  { code: 'billcode', name: '单号', width: 130 },
  { code: 'batchcode', name: '批号', width: 130 },
  {
    code: 'material',
    name: '物料',
    width: 130,
    ref_args: { codeField: 'code', textField: 'name', jsonPath: 'material' }
  },
  { code: 'status', name: '状态', width: 85, options_enum: e_call_status },
  { code: 'billtype', name: '单据类型', width: 85, options_enum: e_require_order_type },
  { code: 'loc', name: '上料位置' },
  { code: 'billdate', name: '日期' },
  { code: 'reqdate', name: '需求日' },
  { code: 'call_qty', name: '叫料数', width: 85 },
  { code: 'pick_qty', name: '拣货数', width: 85 },
  { code: 'stockout_qty', name: '出库数', width: 85 },
  { code: 'unit', name: '单位', width: 85 },
  { code: 'staff', name: '业务员', width: 85 }
]
export const pick_task_define: model_meta[] = [
  { code: 'docdate', name: '任务日期' },
  { code: 'billcode', name: '单号', width: 130 },
  { code: 'worker', name: '备料人员' },
  { code: 'call_count', name: '任务数' },
  { code: 'status', name: '状态', options_enum: e_pick_status }
]

export const material_stock_define: model_meta[] = [
  { code: 'code', name: '物料' },
  { code: 'qty', name: '库存数' },
  { code: 'reserv', name: '预留数' },
  { code: 'locked', name: '冻结数' },
  { code: 'avaliable', name: '可用数' }
]
